﻿namespace FilteredPageReference.Configuration
{
    using System.Configuration;

    public class FilteredPageReferenceConfiguration : ConfigurationSection
    {
        public static FilteredPageReferenceConfiguration GetConfiguration()
        {
            FilteredPageReferenceConfiguration configuration = ConfigurationManager.GetSection("filteredPageReference") as FilteredPageReferenceConfiguration;
            return configuration ?? new FilteredPageReferenceConfiguration();
        }

        [ConfigurationProperty("validAssemblyNamePrefixes", IsRequired = false, DefaultValue = "")]
        public virtual string ValidAssemblyNamePrefixes
        {
            get
            {
                return this["validAssemblyNamePrefixes"] as string;
            }
        }

        [ConfigurationProperty("validFullTypeNamePrefixes", IsRequired = false, DefaultValue = "")]
        public virtual string ValidFullTypeNamePrefixes
        {
            get
            {
                return this["validFullTypeNamePrefixes"] as string;
            }
        }

        [ConfigurationProperty("xmlns", IsRequired = false)]
        public string XmlNamespace
        {
            get
            {
                return "http://FilteredPageReference.Configuration.FilteredPageReferenceConfiguration";
            }
        }
    }
}
